package com.yckj.day02;

import java.util.Scanner;

/**
 * TODO if语句案例1
 * 判断是否是未成年人
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/17 14:36
 */
public class IfDemo1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.print("请输入年龄：");
        short age = scan.nextShort();
        if(age > 0 && age < 18){
            System.out.println("是未成年人");
        }
        scan.close();
    }
}
